<?php
/*
<Controller Information> 
Author: Naseer Ahmad
Date: 13-10-2011
Last Updated on:
*/


class adminChangePasswordController extends appController
{
	function index()
	{
		$this -> render('Admin Change Password');
	}
	
	function changePassword()
	{
		//print_r($this->data);
		
		
		$response = $this -> adminChangePassword -> changePassword(
							$this->data['_oldpassword'], 
							$this->data['_password1'],
							$this->data['_password2']);
		
		
		//echo 'response '.$response;
		//exit;
		
		if($response == 'ok')
		{
			///// Send Notify Email
			//$this->sendNotifyEmail("Benard: Admin Password Changed", 
			//						"You just has changed your password!<br /> Is you? If not plase contact admin", 
			//						$this->page);
			
			$this -> set('changed', 'ok');
			$this -> render('Admin Change Password');
			//$this -> redirect('?page=homeAdmin');
		}
		else
		{
			$this -> set('changed', $response);
			$this -> render('Admin Change Password');
		}
		

		//$this -> render('Admin Change Password');
	}
	


	
}
?>